const Router = require('@koa/router')
const { reply, getResultsByQuestionId, editResult, deleteResultByResultId } = require('../controller/result.controller')
const { verifyToken } = require('../middleware/user.middleware')
const router = new Router({ prefix: '/api/result' })

router.post('/reply', verifyToken, reply)
router.get('/listByQuestionId', getResultsByQuestionId)
router.post('/edit', verifyToken, editResult)
// admin
router.post('/delete', verifyToken, deleteResultByResultId)

module.exports = router